#define HOST "192.168.3.137"

#define HOME_PAGE_NAME		"home"
#define LIST_PAGE_NAME		"list"
#define SEARCH_PAGE_NAME	"search"

#define CGI_DIR_LENGTH 20 // eg. /cgi-bin/mypedigree/

struct pedigree_unit {
	int id;
	char *name;
};

struct pedigree_children_unit {
	int id;
	char *name;
	int sex;
};

struct pedigree_search_unit {
	int id;
	int generation_no;
	char *name;
	int sex;
};

struct pedigree_list_unit {
	struct pedigree_unit self;
	struct pedigree_unit *wife;
	struct pedigree_unit father;
	struct pedigree_unit mother;
	struct pedigree_children_unit *children;
	char *dis;
	int wife_num;
	int children_num;
};

int page_header(char *title, char* info, char* page_name);

int page_footer();

int page_error(int ret);

int getval(char *v, char *n, char *s);

void init_pedigree_list_unit(struct pedigree_list_unit *p_l_unit);

